package com.horry.demo.time_select_demo.utils;

import android.content.Context;
import android.widget.TextView;

import com.horry.demo.time_select_demo.R;
import com.horry.demo.time_select_demo.model.ScheduleEntity;

import java.util.List;

/**
 * Created by Administrator on 2015/12/3.
 */
public class TimeAdapter extends CommonBaseAdapter<ScheduleEntity> {
    public TimeAdapter(Context context, List<ScheduleEntity> datas, int layoutId) {
        super(context, datas, layoutId);
    }

    @Override
    public void convert(ViewHolder holder, ScheduleEntity scheduleEntity) {
        TextView time = holder.getView(R.id.time);
        time.setText(scheduleEntity.getHour());
        if(scheduleEntity.getAvailable()==1)
        {
            time.setEnabled(true);
        }
        else
        {
            time.setEnabled(false);
        }
    }
    
}
